package type.person;

import util.Null;

/**
 * @Date 2021/5/5 10:12 上午
 * @Author dengxin
 */
public class Person {

    private String first;
    private String last;
    private String address;

    public Person(String first, String last, String address) {
        this.first = first;
        this.last = last;
        this.address = address;
    }

    @Override
    public String toString() {
        return "Person: first=" + this.first + ", last=" + this.last + ", address=" + this.address;
    }

    public static class NullPerson extends Person implements Null {
        public NullPerson() {
            super("None", "None", "None");
        }

        @Override
        public String toString() {
            return "NullPerson";
        }
    }

    public static final Person NULL = new NullPerson();
}
